clearvars -except Globaloption option

if exist('Globaloption','var')==0
    Globaloption.savefig=1;
end

load MAT/benchmark_UK_30.mat
output_rp = 0.03;
f = figure;
f.Position = [1000 918 560 300];
ylimit = [0.5, 2.5];
plot_CI(startdatenum:enddatenum, s, std_coeff, gdebt, upper, ylimit)
set(gcf, 'PaperUnits', 'inches', 'Units', 'inches');
f.PaperSize = [6 3.75];

if Globaloption.savefig == 1
    print(['../../results/figures_main/UK/post1946/cs_UK_', num2str(output_rp * 1000)], '-dpdf', '-fillpage');
end

load MAT/benchmark_UK_30.mat
f = figure;
f.Position = [1000 918 560 300];
ttime = [1947:1:2020];
hg = plot(ttime, gdebt(2:end), 'Color', 'blue', 'LineWidth', 3); hold on;
hd = plot(ttime, s, 'LineWidth', 3); hold on;
load MAT/debtinVAR_break_UK.mat
hu = plot(ttime, s, 'LineWidth', 3); hold on;
axis([min(ttime) max(ttime) -1 4])
hleglines = [hg hd(1) hu];
legend(hleglines, 'Debt/GDP', 'Benchmark; rp^Y = 3%', 'Debt-in-VAR; rp^Y = 3%')
grid on
xlabel('Year')
ylabel('PV(Surplus)/GDP')
set(gca, 'Layer', 'top', 'FontSize', 9)
set(gca, 'FontName', 'Times New Roman')
set(gcf, 'PaperUnits', 'inches', 'Units', 'inches');
f.PaperSize = [6 3.75];

if Globaloption.savefig == 1
    print(['../../results/figures_main/UK/post1946/cs_UK_allspec_', num2str(0.03 * 1000)], '-dpdf', '-fillpage');
end
